package main

//清洗操作可以将字符串两端的一些字符删掉，常用来删除字符串两端的空格
/*func Trim(s, cutset string) string
func TrimLeft(s, cutset string) string
func TrimRight(s, cutset string) string
func TrimPrefix(s, prefix string) string
func TrimSuffix(s, suffix string) string
func TrimSpace(str string) string*/
import (
	"fmt"
	"strings"
)

func main() {
	var str1 string = "   lqz is Nb  "
	var str2 string = "***lqz is Nb***"
	fmt.Println(strings.Trim(str1, " ")) // lqz is Nb
	fmt.Println(strings.Trim(str2, "*")) //lqz is Nb
	// 专门用来清除两端空格的函数
	fmt.Println(strings.TrimSpace(str1))      // lqz is Nb
	fmt.Println(strings.TrimRight(str1, " ")) //    lqz is Nb
}
